package org.zhaijisong.pojo;

import java.math.BigDecimal;
import java.sql.Timestamp;

public class Worksheet {
    private Integer id;
    private String orderId;
    private Integer userId;
    private String product;
    private Integer userAddress;
    private Integer consigneeAddress;
    private String phone;
    private BigDecimal money;
    private Integer payment;
    private Integer state;
    private Timestamp generTime;
    private String beizhu;
    //用户
    private User user;
    //收货人详细地址
    private DetailedAddress consignee;
    //送货人详细地址
    private DetailedAddress userAdd;

    public String getBeizhu() {
        return beizhu;
    }

    public void setBeizhu(String beizhu) {
        this.beizhu = beizhu;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public DetailedAddress getConsignee() {
        return consignee;
    }

    public void setConsignee(DetailedAddress consignee) {
        this.consignee = consignee;
    }

    public DetailedAddress getUserAdd() {
        return userAdd;
    }

    public void setUserAdd(DetailedAddress userAdd) {
        this.userAdd = userAdd;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public Integer getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(Integer userAddress) {
        this.userAddress = userAddress;
    }

    public Integer getConsigneeAddress() {
        return consigneeAddress;
    }

    public void setConsigneeAddress(Integer consigneeAddress) {
        this.consigneeAddress = consigneeAddress;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getPayment() {
        return payment;
    }

    public void setPayment(Integer payment) {
        this.payment = payment;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Timestamp getGenerTime() {
        return generTime;
    }

    public void setGenerTime(Timestamp generTime) {
        this.generTime = generTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Worksheet worksheet = (Worksheet) o;

        if (id != null ? !id.equals(worksheet.id) : worksheet.id != null) return false;
        if (orderId != null ? !orderId.equals(worksheet.orderId) : worksheet.orderId != null) return false;
        if (userId != null ? !userId.equals(worksheet.userId) : worksheet.userId != null) return false;
        if (product != null ? !product.equals(worksheet.product) : worksheet.product != null) return false;
        if (userAddress != null ? !userAddress.equals(worksheet.userAddress) : worksheet.userAddress != null)
            return false;
        if (consigneeAddress != null ? !consigneeAddress.equals(worksheet.consigneeAddress) : worksheet.consigneeAddress != null)
            return false;
        if (phone != null ? !phone.equals(worksheet.phone) : worksheet.phone != null) return false;
        if (money != null ? !money.equals(worksheet.money) : worksheet.money != null) return false;
        if (payment != null ? !payment.equals(worksheet.payment) : worksheet.payment != null) return false;
        if (state != null ? !state.equals(worksheet.state) : worksheet.state != null) return false;
        if (generTime != null ? !generTime.equals(worksheet.generTime) : worksheet.generTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (product != null ? product.hashCode() : 0);
        result = 31 * result + (userAddress != null ? userAddress.hashCode() : 0);
        result = 31 * result + (consigneeAddress != null ? consigneeAddress.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (payment != null ? payment.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (generTime != null ? generTime.hashCode() : 0);
        return result;
    }
}
